package duppentity;

import com.google.gson.JsonObject;
import duppentity.annotations.Dupp;
import duppentity.annotations.Param;

import java.util.List;

public interface RoleDupp {

    /**
     * 角色列表
     */
    @Dupp("mng.sysRole.getList")
    JsonObject getRoleList(@Param("offset") Integer offset,
                              @Param("count") Integer count);

    @Dupp("sysRole.get")
    JsonObject getRole(@Param("id")Long id);

    @Dupp("sysRole.create")
    JsonObject addRole(@Param("sessionId")String sessionId,
                       @Param("userId")Long userId,
                       @Param("name")String name,
                       @Param("itemIds") List<Long> itemIds,
                          @Param("createBy")Long createBy);

    @Dupp("sysRole.update")
    JsonObject editRole(@Param("sessionId")String sessionId,
                       @Param("userId")Long userId,
                        @Param("id")Long id,
                       @Param("name")String name,
                        @Param("itemIds") List<Long> itemIds,
                       @Param("modifyBy")Long modifyBy);

    @Dupp("sysRole.delete")
    JsonObject deleteRole(@Param("id")Long id,
                        @Param("modifyBy")Long modifyBy);
}
